package com.shkco.xbjcc.feign;

import com.shkco.result.JSONResult;
import com.shkco.xbjcc.doc.CourseDoc;
import com.shkco.xbjcc.fallback.SearchServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-search",fallbackFactory = SearchServiceFallbackFactory.class)
public interface SearchService {

    @RequestMapping(value="/course/saveSearch",method= RequestMethod.POST)
    JSONResult saveSearch(@RequestBody CourseDoc courseDoc);

    @RequestMapping(value="/course/delSearch/{id}",method= RequestMethod.POST)
    JSONResult delSearch(@PathVariable("id") Long id);

}
